Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

undefined method `fixtures'

#44

The tests installed by restful_authentication encounter undefined-method errors, starting with "undefined method fixtures'" for the unit tests. The problem seems to be that the tests derive only from Test::Unit::TestCase, whereas the relevant methods are defined in ActiveRecord::TestCase and ActionController::TestCase for unit and functional tests, respectively.

My current work-around is to change the base class by hand, e.g. to replace

class UserTest < Test::Unit::TestCase

with

class UserTest < ActiveRecord::TestCase

This addresses the error, so that the tests at least can run.

Reported by Jeff Schwab · March 18th, 2009 @ 05:03 PM

State: new
Milestone: none
Assigned to: mrflip mrflip

Activity

  1. Taryn East
    Taryn East
    • Title changed from undefined method `fixtures' to 2.0-non-compliant

    You don't know me but... I'm working on some Rails 2.0-compliant stuff to get the code working with Rails 2.3.2 (which I'm using at work).

    I've made a fork of the repo for this. When I'm done I'll make a pull-request.

    My plan is to add another command-line option "--two-point-oh" that will switch on the 2.0-style things (eg rm fixtures and ids, and using "test do" instead of "def test_").

    Right now I'm not sure if this option should be "on" or "off" by default.

    whatcha think?

    Taryn

    March 30th, 2009 @ 09:40 AM

  2. Taryn East
    Taryn East

    Hmmm - just thinking - if you were able to just remove 'fixtures', perhaps there should be no backwards-compatibility at all. Is there not some sort of "RA Classic" for that sort of thing?

    Just curious... it'd make my life much easier...

    Cheers, Taryn

    March 30th, 2009 @ 09:56 AM

  3. Jeff Schwab
    Jeff Schwab

    I see the same problem with 2.3 and 2.0, so I'm not sure what the flag would do. It's not just 'fixtures'; if you remove that, other errors occur later in the file.

    March 31st, 2009 @ 06:05 PM

  4. Jeff Schwab
    Jeff Schwab

    How and why did you change the name of the ticket? This is not a 2.0-specific issue; in fact, I don't see how it's version-specific at all. I think you'll have better luck if you change the name back, and open a new ticket.

    April 1st, 2009 @ 11:42 AM

  5. Jeff Schwab
    Jeff Schwab
    • Title changed from 2.0-non-compliant to undefined method `fixtures'

    Restoring a title that matches the error message, so other victims will be able to find this ticket more easily.

    April 1st, 2009 @ 11:43 AM

  6. Jeff Schwab
    Jeff Schwab

    This problem appears to be fixed in http://github.com/technoweenie/r...

    The version with the problem is still online at: http://svn.techno-weenie.net/pro...

    April 5th, 2009 @ 07:52 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.